<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>全局组件</title>
</head>
<body>
<div id="app">
    <heima></heima>
    <heima></heima>
    <heima></heima>
    <heima></heima>
</div>

<script src="./node_modules/vue/dist/vue.js"></script>
<script>
    var heima ={
        template: `
        <div>
        <button @click="num++">我是:{{num}}</button>
        </div>
        `,
        data(){
            return {num : 18}
        }
    }


    var app = new Vue({
        el: "#app",
       components:{
            heima
       }

    })
</script>
</body>
</html>